namespace QMVnSoft.ReportForms
{
    using QMVnSoft;
    using QMVnSoft.Controls;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormKTH04CViewer : FormReportViewer
    {
        private IContainer components;
        private LabelControl lblNgay_Ct1;
        private LabelControl lblNgay_Ct2;
        private LabelControl lblNo_Co;
        private LabelControl lblTk_List;
        private TextDate txtNgay_Ct1;
        private TextDate txtNgay_Ct2;
        private TextOption txtNo_Co;
        private LabelControl txtNo_Co0;
        private TextControl txtTk_List;

        public FormKTH04CViewer()
        {
            this.InitializeComponent();
            this.txtNgay_Ct1.Value = AppInstance.StartWorkingDate;
            this.txtNgay_Ct2.Value = AppInstance.EndWorkingDate;
            this.txtTk_List.Value = "6271,6272,6273,6274,6277,6278";
            this.txtNo_Co.Value = "N";
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormKTH04CViewer));
            this.txtNgay_Ct2 = new QMVnSoft.Controls.TextDate();
            this.lblNgay_Ct2 = new QMVnSoft.Controls.LabelControl();
            this.txtNgay_Ct1 = new QMVnSoft.Controls.TextDate();
            this.lblNgay_Ct1 = new QMVnSoft.Controls.LabelControl();
            this.txtNo_Co0 = new QMVnSoft.Controls.LabelControl();
            this.txtNo_Co = new QMVnSoft.Controls.TextOption();
            this.lblNo_Co = new QMVnSoft.Controls.LabelControl();
            this.txtTk_List = new QMVnSoft.Controls.TextControl();
            this.lblTk_List = new QMVnSoft.Controls.LabelControl();
            this.rptContainer.Panel1.SuspendLayout();
            this.rptContainer.SuspendLayout();
            this.SuspendLayout();
            // 
            // rptContainer
            // 
            this.rptContainer.Location = new System.Drawing.Point(0, 25);
            // 
            // rptContainer.Panel1
            // 
            this.rptContainer.Panel1.Controls.Add(this.txtTk_List);
            this.rptContainer.Panel1.Controls.Add(this.txtNo_Co0);
            this.rptContainer.Panel1.Controls.Add(this.txtNo_Co);
            this.rptContainer.Panel1.Controls.Add(this.lblTk_List);
            this.rptContainer.Panel1.Controls.Add(this.lblNo_Co);
            this.rptContainer.Panel1.Controls.Add(this.txtNgay_Ct2);
            this.rptContainer.Panel1.Controls.Add(this.lblNgay_Ct2);
            this.rptContainer.Panel1.Controls.Add(this.txtNgay_Ct1);
            this.rptContainer.Panel1.Controls.Add(this.lblNgay_Ct1);
            this.rptContainer.Size = new System.Drawing.Size(794, 514);
            this.rptContainer.SplitterDistance = 67;
            // 
            // txtNgay_Ct2
            // 
            this.txtNgay_Ct2.DateTimeFormat  = QMVnSoft.Controls.TextDate.DateTimeFormatType.Date;
            this.txtNgay_Ct2.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNgay_Ct2.InsertKeyMode = System.Windows.Forms.InsertKeyMode.Overwrite;
            this.txtNgay_Ct2.Location = new System.Drawing.Point(316, 45);
            this.txtNgay_Ct2.Mask = "00/00/0000";
            this.txtNgay_Ct2.Name = "txtNgay_Ct2";
            this.txtNgay_Ct2.OldValue = null;
            this.txtNgay_Ct2.Size = new System.Drawing.Size(100, 20);
            this.txtNgay_Ct2.TabIndex = 3;
            this.txtNgay_Ct2.Value = ((object)(resources.GetObject("txtNgay_Ct2.Value")));
            // 
            // lblNgay_Ct2
            // 
            this.lblNgay_Ct2.AutoSize = true;
            this.lblNgay_Ct2.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblNgay_Ct2.Location = new System.Drawing.Point(256, 48);
            this.lblNgay_Ct2.Name = "lblNgay_Ct2";
            this.lblNgay_Ct2.Size = new System.Drawing.Size(54, 14);
            this.lblNgay_Ct2.TabIndex = 97;
            this.lblNgay_Ct2.Text = "Đến ngày";
            // 
            // txtNgay_Ct1
            // 
            this.txtNgay_Ct1.DateTimeFormat  = QMVnSoft.Controls.TextDate.DateTimeFormatType.Date;
            this.txtNgay_Ct1.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNgay_Ct1.InsertKeyMode = System.Windows.Forms.InsertKeyMode.Overwrite;
            this.txtNgay_Ct1.Location = new System.Drawing.Point(108, 45);
            this.txtNgay_Ct1.Mask = "00/00/0000";
            this.txtNgay_Ct1.Name = "txtNgay_Ct1";
            this.txtNgay_Ct1.OldValue = null;
            this.txtNgay_Ct1.Size = new System.Drawing.Size(100, 20);
            this.txtNgay_Ct1.TabIndex = 2;
            this.txtNgay_Ct1.Value = ((object)(resources.GetObject("txtNgay_Ct1.Value")));
            // 
            // lblNgay_Ct1
            // 
            this.lblNgay_Ct1.AutoSize = true;
            this.lblNgay_Ct1.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblNgay_Ct1.Location = new System.Drawing.Point(12, 48);
            this.lblNgay_Ct1.Name = "lblNgay_Ct1";
            this.lblNgay_Ct1.Size = new System.Drawing.Size(47, 14);
            this.lblNgay_Ct1.TabIndex = 98;
            this.lblNgay_Ct1.Text = "Từ ngày";
            // 
            // txtNo_Co0
            // 
            this.txtNo_Co0.AutoSize = true;
            this.txtNo_Co0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNo_Co0.ForeColor = System.Drawing.Color.Blue;
            this.txtNo_Co0.Location = new System.Drawing.Point(136, 27);
            this.txtNo_Co0.Name = "txtNo_Co0";
            this.txtNo_Co0.Size = new System.Drawing.Size(62, 14);
            this.txtNo_Co0.TabIndex = 114;
            this.txtNo_Co0.Text = "N-Nợ, C-Có";
            // 
            // txtNo_Co
            // 
            this.txtNo_Co.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtNo_Co.CheckTextSearched = false;
            this.txtNo_Co.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtNo_Co.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNo_Co.InputMask = "N,C";
            this.txtNo_Co.Location = new System.Drawing.Point(108, 24);
            this.txtNo_Co.Name = "txtNo_Co";
            this.txtNo_Co.OldValue = null;
            this.txtNo_Co.Size = new System.Drawing.Size(22, 20);
            this.txtNo_Co.TabIndex = 1;
            this.txtNo_Co.Text = "N";
            this.txtNo_Co.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtNo_Co.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtNo_Co.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtNo_Co.Value = "N";
            // 
            // lblNo_Co
            // 
            this.lblNo_Co.AutoSize = true;
            this.lblNo_Co.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblNo_Co.Location = new System.Drawing.Point(12, 27);
            this.lblNo_Co.Name = "lblNo_Co";
            this.lblNo_Co.Size = new System.Drawing.Size(51, 14);
            this.lblNo_Co.TabIndex = 113;
            this.lblNo_Co.Text = "Phát sinh";
            // 
            // txtTk_List
            // 
            this.txtTk_List.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtTk_List.CheckTextSearched = false;
            this.txtTk_List.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTk_List.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTk_List.Location = new System.Drawing.Point(108, 3);
            this.txtTk_List.MaxLength = 254;
            this.txtTk_List.Name = "txtTk_List";
            this.txtTk_List.OldValue = null;
            this.txtTk_List.Size = new System.Drawing.Size(308, 20);
            this.txtTk_List.TabIndex = 0;
            this.txtTk_List.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtTk_List.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTk_List.Value = ((object)(resources.GetObject("txtTk_List.Value")));
            // 
            // lblTk_List
            // 
            this.lblTk_List.AutoSize = true;
            this.lblTk_List.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTk_List.Location = new System.Drawing.Point(12, 6);
            this.lblTk_List.Name = "lblTk_List";
            this.lblTk_List.Size = new System.Drawing.Size(53, 14);
            this.lblTk_List.TabIndex = 113;
            this.lblTk_List.Text = "Tài khoản";
            // 
            // FormKTH04CViewer
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.CheckDetailMost = true;
            this.ClientSize = new System.Drawing.Size(794, 539);
            this.CrossTabReport = true;
            this.Name = "FormKTH04CViewer";
            this.rptContainer.Panel1.ResumeLayout(false);
            this.rptContainer.Panel1.PerformLayout();
            this.rptContainer.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        protected override void OnMakeReport()
        {
            AppInstance.StartWorkingDate = (DateTime) this.txtNgay_Ct1.Value;
            AppInstance.EndWorkingDate = (DateTime) this.txtNgay_Ct2.Value;
            base.LocalTable = new ReportDataAccess().KTH04_Get(AppInstance.Subsidiaries, this.txtNgay_Ct1.Value, this.txtNgay_Ct2.Value, this.txtTk_List.Value, this.txtNo_Co.Value, AppInstance.DefLanguage);
            base.OnMakeReport();
        }

        protected override void OnSendParameters()
        {
            base.StimulReport["Ngay"] = "Từ ngày " + string.Format("{0:dd/MM/yyyy}", this.txtNgay_Ct1.Value) + " đến ngày " + string.Format("{0:dd/MM/yyyy}", this.txtNgay_Ct2.Value);
        }
    }
}

